package com.zzt.questionbankquestion.mapper;

import com.zzt.questionbankquestion.bean.Difficulty;
import com.zzt.questionbankquestion.bean.dto.DifficultyDTO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel="spring")
public interface DifficultyConverter {
    DifficultyConverter INSTANCE= Mappers.getMapper(DifficultyConverter.class);

//    @Mappings({
//            @Mapping(source = "id",target = "id"),
//            @Mapping(source = "difficultyName",target = "difficultyName")
//    })

    DifficultyDTO doToDto(Difficulty difficulty);
    Difficulty dtoToDo(DifficultyDTO difficultyDTO);
    List<DifficultyDTO> doListToDtoList(List<Difficulty> difficulties);
    List<Difficulty> dtoListToDoList(List<DifficultyDTO> difficultyDTOS);
}
